<include file="Public:header" />
<div style="line-height:32px">
<div>
<img src="{$Think.config.IMG_PATH}<if condition='$data.state eq 2'>{$data.img}<else/>/App/Vote/Static/img/404.jpg</if>" class="img" width="100" height="100">

</div>
<div>No:{$data.id} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$data.name}</div>
<div id="votenum">{$data.vote_num}</div>
<div >{$data.info}</div>
<div class="back">
  <button type="button" class="btn btn-default"  onclick="addvote()"> <span class="glyphicon glyphicon-step-backward" aria-hidden="true"></span> 投票 </button>
</div>
<div class="back">
  <button type="button" class="btn btn-default" onclick="history.go(-1)"> <span class="glyphicon glyphicon-step-backward" aria-hidden="true"></span> 返回 </button>
</div>
</div>
<h3>奖品设置</h3>
<p class="rules">{$info.lottery}</p>
<h3>活动规则</h3>
<p class="rules">{$info.rules}</p>
<include file="Public:footer" /> 
<script type="text/javascript">
	var activityid = "{$_GET['activity_id']}";
	var userid = "{$_GET['id']}";
	function addvote(){
		$.getJSON('__URL__/subVote', {activityid:activityid,userid:userid}, function(json){

			if(json.status ==1){
				$("#votenum").html(json.data);
			}
			alert(json.info);
				
		})
	}
</script>